<?php
namespace Shopmanage\Model;
use Think\Model\ViewModel;
class KamiViewModel extends ViewModel {
   public $viewFields = array(
     'kami'=>array('_table'=>"sm_events_gifts_km",'id','cardno', 'secret', 'giftid', 'status', 'category', 'shopuid', 'tscode','_type'=>'LEFT'),
	 'gift'=>array('_table'=>'sm_events_gifts','id'=>"giftid",'name'=>'giftname','_on'=>'kami.giftid=gift.id','_type'=>'LEFT'),
	 'suser'=>array('_table'=>'sm_shop_users','id'=>"suid",'_on'=>'kami.shopuid=suser.id','_type'=>'LEFT'),
     'smuser'=>array('_table'=>'sm_user','usernick'=>'nick', '_on'=>'smuser.id=suser.userid','_type'=>'LEFT')
   );
 }